package com.glsc.ngateway.common.base.domainmapper;

import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.OwnCloudSystemDirConfig;
import com.glsc.ngateway.common.api.platform.dto.owncloud.OwnCloudSystemDirConfigDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;


/**
 * @Author: xc
 * @Desc: domin到dto转换辅助类
 */
@Mapper(componentModel = "spring")
public interface OwnCloudSystemDirConfigMapper {
    OwnCloudSystemDirConfigMapper INSTANCE = Mappers.getMapper(OwnCloudSystemDirConfigMapper.class);

    @Mapping(target = "sysInsideDir", ignore = true)
    OwnCloudSystemDirConfigDto domain2dto(OwnCloudSystemDirConfig domain);

    List<OwnCloudSystemDirConfigDto> domain2dto(List<OwnCloudSystemDirConfig> domain);

    @Mapping(target = "insertTime", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    @Mapping(target = "deleted", ignore = true)
    @Mapping(target = "versionTime", ignore = true)
    @Mapping(target = "parentPath", ignore = true)
    @Mapping(target = "valid", ignore = true)
    OwnCloudSystemDirConfig dto2domain(OwnCloudSystemDirConfigDto dto);

    List<OwnCloudSystemDirConfig> dto2domain(List<OwnCloudSystemDirConfigDto> dto);
}
